﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyManagement.aspx.cs"
    Inherits="eProject.Web.UI.CompanyManagement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="frmCitiesManagement" runat="server">
    <div>
        <asp:Button ID="btnAddNew" runat="server" Text="Add New" />
        <asp:GridView ID="grvCompany" runat="server" AllowPaging="True" ShowHeaderWhenEmpty="True"
            AutoGenerateColumns="False" DataKeyNames="Id" BorderColor="#E7E7FF" BorderStyle="Solid"
            BorderWidth="1px" CellPadding="4" ForeColor="#333333" OnPageIndexChanging="grvCompany_PageIndexChanging"
            OnRowCancelingEdit="grvCompany_RowCancelingEdit" OnRowDeleting="grvCompany_RowDeleting"
            OnRowEditing="grvCompany_RowEditing" OnRowUpdating="grvCompany_RowUpdating">
            <AlternatingRowStyle BackColor="#F7F7F7" />
            <Columns>
                <asp:TemplateField HeaderText="Edit">
                    <EditItemTemplate>
                        <asp:ImageButton ID="btnUpdate" runat="server" CausesValidation="True" CommandName="Update"
                            ImageUrl="~/Images/Icons/save.png" />
                            <asp:ImageButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                            ImageUrl="~/Images/Icons/back.png" />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                            ImageUrl="~/Images/Icons/edit.png" />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:ImageButton ID="btnInsert" runat="server" CausesValidation="False" CommandName="Insert"
                            ImageUrl="~/Images/Icons/save.png" UseSubmitBehavior="False" />
                    </FooterTemplate>
                    <FooterStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="Company ID" Visible="false" ItemStyle-HorizontalAlign="Center"
                    ReadOnly="True">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:TemplateField HeaderText="Company Name">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblName" runat="Server" Text='<%# Eval("Name") %>' />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtName" runat="Server"></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Address">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtAddress" runat="server" Text='<%# Bind("Address") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblAddress" runat="Server" Text='<%# Eval("Address") %>' />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtAddress" runat="Server"></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Phone Number">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPhoneNumber" runat="server" Text='<%# Bind("PhoneNumber") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblPhoneNumber" runat="Server" Text='<%# Eval("PhoneNumber") %>' />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtPhoneNumber" runat="Server"></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Email">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblEmail" runat="Server" Text='<%# Eval("Email") %>' />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtEmail" runat="Server"></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Created Date">
                    <ItemTemplate>
                        <asp:Label ID="lblCreatedDate" runat="Server" Text='<%# Eval("CreatedDate") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Last Update">
                    <ItemTemplate>
                        <asp:Label ID="lblLastUpdate" runat="Server" Text='<%# Eval("LastUpdate") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                            ImageUrl="~/Images/Icons/delete.png" />
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:ImageButton ID="btnCancelInsert" runat="server" CausesValidation="False" CommandName="CancelInsert"
                            ImageUrl="~/Images/Icons/back.png" UseSubmitBehavior="False" />
                    </FooterTemplate>
                    <FooterStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td>
                            <asp:ImageButton ID="btnEmptyInsert" runat="server" CausesValidation="False" CommandName="EmptyInsert"
                                ImageUrl="~/Images/Icons/save.png" UseSubmitBehavior="False" />
                        </td>
                        <td>
                            City Name:
                        </td>
                        <td>
                            <asp:TextBox ID="txtName" runat="Server">
                            </asp:TextBox>
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
